package com.leruan.aasimp.bean;

import java.util.Date;

public class UsedCarBuyMainBean {
	
	private Long id;
	private String title;		//标题
	private String address; 	//区域
	private Date releaseTime;	//发布时间
	
	
	
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public String getReleaseTime() {
		Date nowDate = new Date();
		long time = (nowDate.getTime() - releaseTime.getTime())/1000;
		if(time < 60*60)
			return time/60 + "分钟";
		if(time < 24*60*60)
			return time/60/60 + "小时";
		return releaseTime.toString().substring(5, 10);
	}
	public void setReleaseTime(Date releaseTime) {
		this.releaseTime = releaseTime;
	}
	
}
